import request from '@/utils/request'

export function getMyPaperList(data) {
  return request({
    url: '/paper/export',
    method: 'post',
    data
  })
}

export function getUserPapers(data) {
  return request({
    url: '/paper/UserGetPapers',
    method: 'post',
    data
  })
}

export function getMyPaperExcelList(data) {
  return request({
    url: '/paper/UserExcelDownloads',
    method: 'post',
    data
  })
}

export function thesis_add(data) {
  return request({
    url: '/paper/addPaper',
    method: 'post',
    data
  })
}

export function thesis_add2(data) {
  return request({
    url: '/paper/UpdatePaper',
    method: 'post',
    data
  })
}

export function thesis_delete(PaperID) {
  return request({
    url: '/paper/DeletePaper',
    method: 'get',
    params: { PaperID }
  })
}

export function thesis_commit(PaperID) {
  return request({
    url: '/paper/ReCommitPaper',
    method: 'get',
    params: { PaperID }
  })
}

export function get_thesis_author(id) {
  return request({
    url: '/paperauthor/selectauthor',
    method: 'get',
    params: { id }
  })
}

export function thesis_author_add(data) {
  return request({
    url: '/paperauthor/addauthor',
    method: 'post',
    data
  })
}

export function thesis_author_edit(data) {
  return request({
    url: '/paperauthor/updateauthor',
    method: 'post',
    data
  })
}

export function thesis_author_delete(id) {
  return request({
    url: '/paperauthor/deleteauthor',
    method: 'get',
    params: { id }
  })
}

export function get_thesis_project(paperID) {
  return request({
    url: '/paperproject/GetPaperProjectByPaperID',
    method: 'get',
    params: { paperID }
  })
}

export function thesis_project_add(data) {
  return request({
    url: '/paperproject/AddPaperProject',
    method: 'post',
    data
  })
}

export function thesis_project_edit(data) {
  return request({
    url: '/paperproject/UpdatePaperProject',
    method: 'post',
    data
  })
}

export function thesis_project_delete(paperProjectID) {
  return request({
    url: '/paperproject/RemovePaperProject',
    method: 'get',
    params: { paperProjectID }
  })
}

// 院级审核
export function get_thesis_yuanji(data) {
  return request({
    url: '/paper/CollegeUserGetPaper',
    method: 'post',
    data
  })
}

export function thesis_pass_yuanji(PID) {
  return request({
    url: '/paper/CollegeCheckPass',
    method: 'get',
    params: { PID }
  })
}

export function thesis_back_yuanji(data) {
  return request({
    url: '/paper/CollegeCheckBack',
    method: 'post',
    data
  })
}

// 校级审核
export function get_thesis_xiaoji(data) {
  return request({
    url: '/paper/SchoolUserGetPaper',
    method: 'post',
    data
  })
}

export function thesis_pass_xiaoji(PID) {
  return request({
    url: '/paper/SchoolCheckPass',
    method: 'get',
    params: { PID }
  })
}

export function thesis_back_xiaoji(data) {
  return request({
    url: '/paper/SchoolCheckBack',
    method: 'post',
    data
  })
}

export function thesis_author_edit_xiaoji(data) {
  return request({
    url: '/paperauthor/upPaperAuthor',
    method: 'post',
    data
  })
}

export function update_thesis_source(data) {
  return request({
    url: '/paperqulification/upPaperScore',
    method: 'post',
    data
  })
}

// 附件
export function file_add(data) {
  return request({
    url: '/paper/addpaperfile',
    method: 'post',
    data
  })
}

export function get_file(id) {
  return request({
    url: '/paper/pagepaperfileCondition',
    method: 'get',
    params: { id }
  })
}

export function file_delete(paperfileID) {
  return request({
    url: '/paper/Deletepaperfile',
    method: 'get',
    params: { paperfileID }
  })
}

// 量化
export function getCascadingData(params) {
  return request({
    url: '/papertype/getCascadingData',
    method: 'get',
    params
  })
}

export function getQulification(PaperID) {
  return request({
    url: '/paperqulification/getPaperQulification',
    method: 'get',
    params: { PaperID }
  })
}

export function deleteQulification(PaperQualificationID) {
  return request({
    url: '/paperqulification/deletePaperQulification',
    method: 'get',
    params: { PaperQualificationID }
  })
}

export function addQulification(data) {
  return request({
    url: '/paperqulification/addPaperQualification',
    method: 'post',
    data
  })
}

export function GetById(paperID) {
  return request({
    url: '/paper/GetPaperById',
    method: 'get',
    params: { paperID }
  })
}

export function GetPaperDTOById(paperID) {
  return request({
    url: '/paper/GetPaperDTOById',
    method: 'get',
    params: { paperID }
  })
}

// 撤回论文
export function thesis_withdraw(id) {
  return request({
    url: '/paper/WithdrawPaper',
    method: 'get',
    params: { id }
  })
}
